/**
 * JavaBaseReview com.xuwei.base.junit
 * NoVisibility.java
 * 2017-9-20 下午1:59:02
 * TODO
 */
package com.xuwei.base.junit;
/**
 * <p>Description: </p>
 * <p>Title: NoVisibility.java</p>
 * <p>Copyright: Copyright (c) 2017</p>
 * <p>Company: Eastcom</p>
 * <p>Date: 2017-9-20 下午1:59:02</p> 
 * @author xuwei 
 * @version 1.0 
 * 
 */
public class NoVisibility {
	private static boolean ready;
	private static int number;
	
	private static class ReaderThread extends Thread{
		public void run(){
			while(!ready){
				Thread.yield();
			}
			System.out.println(number);
		}
	}
	
	public static void main(String[] args) {
		new ReaderThread().start();
		number = 42;
		ready = true;
	}

}
